package com.nuoniu.sibanyun.entity.crm;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.nuoniu.sibanyun.common.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * <p>
 * 秘钥管理
 * </p>
 *
 * @author baiqiang
 * @since 2020-07-17
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("sys_secretkey")
@ApiModel(value="CrmSecretKey对象", description="秘钥管理")
public class CrmSecretKey extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "密钥")
    @TableField("secret_key")
    private String secretKey;

    @ApiModelProperty(value = "商品id")
    @TableField("goods_id")
    private Integer goodsId;

    @ApiModelProperty(value = "商品名称")
    @TableField("goods_name")
    private String goodsName;

    @ApiModelProperty(value = "用户数")
    @TableField("users")
    private Integer users;

    @ApiModelProperty(value = "年限")
    @TableField("years")
    private Integer years;

    @ApiModelProperty(value = "次数")
    @TableField("times")
    private Integer times;

    @ApiModelProperty(value = "已使用次数")
    @TableField("use_times")
    private Integer useTimes;

    @ApiModelProperty(value = "备注")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty(value = "类型0免费 1付费")
    @TableField("type")
    private Integer type;

    @ApiModelProperty(value = "状态0正常 1删除 2可用")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "创建人id")
    @TableField("create_user_id")
    private Integer createUserId;

    @ApiModelProperty(value = "使用时间")
    @TableField("use_date")
    private LocalDateTime useDate;

    @ApiModelProperty(value = "结束时间")
    @TableField("end_date")
    private LocalDateTime endDate;

    @ApiModelProperty(value = "创建日期")
    @TableField("create_date")
    private LocalDateTime createDate;

    @ApiModelProperty(value = "修改日期")
    @TableField("update_date")
    private LocalDateTime updateDate;

    @TableField(exist = false)
    private Integer count;
}
